package com.pair.micro.fee.modules.charge.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fhs.core.trans.vo.TransPojo;
import com.pair.micro.common.utils.DateUtils;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Schema(description = "收费设置")
public class ChargeConfigVO implements Serializable, TransPojo {
    private static final long serialVersionUID = 1L;

    @Schema(description = "id")
    private String id;

    @Schema(description = "收费项名称", required = true)
    @NotBlank(message = "收费项名称不能为空")
    private String name;

    @Schema(description = "小区id", required = true)
    @NotNull(message = "小区id不能为空")
    private Integer gardenId;

    @Schema(description = "收费类型，物业费", required = true)
    @NotBlank(message = "收费类型不能为空")
    private String chargeType;

    @Schema(description = "每平米收取的单价", required = true)
    @NotNull(message = "单价不能为空")
    private BigDecimal unitPrice;

    @Schema(description = "开始时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date startTime;

    @Schema(description = "结束时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date endTime;

    @Schema(description = "收费标识 20241001:周期性费用 20241002:一次性费用 20241003:常用性费用", required = true)
    @NotBlank(message = "收费标识不能为空")
    private String chargeMark;

    @Schema(description = "收费公式", required = true)
    @NotBlank(message = "收费公式不能为空")
    private String chargeFormula;

    @Schema(description = "附加费用", required = true)
    @NotNull(message = "附加费用不能为空")
    private BigDecimal additionalFee;

    @Schema(description = "不同步梯控：1:是 0:否", required = true)
    private Integer isUpdateLift;

    @Schema(description = "计费周期")
    private Integer chargeCycle;

    @Schema(description = "临时：1:是 0:否", required = true)
    private Integer casual;

    @Schema(description = "收费分类", required = true)
    @NotBlank(message = "收费分类不能为空")
    private String chargeClassify;


    @Schema(description = "创建时间")
    @JsonFormat(pattern = DateUtils.DATE_TIME_PATTERN)
    private Date createTime;

}
